package com.amumu.drama.common.modules.member.service;

import com.amumu.drama.common.base.api.CommonResult;
import com.amumu.drama.model.UmsMember;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;

/**
 * 会员管理Service
 * Created by macro on 2018/8/3.
 */
public interface UmsMemberService extends IService<UmsMember> {
    /**
     * 根据用户名获取会员
     */
    UmsMember getByUsername(String username);

    UmsMember getByPhoneNum(String phoneNum);

    /**
     * 根据会员编号获取会员
     */
    UmsMember getById(Long id);


    /**
     * 根据会员id修改会员积分
     */
    void updateIntegration(Long id, BigDecimal integration);


    CommonResult<Boolean> sendSmsCaptcha(String phoneNum);



    CommonResult<String> verifyIdCard(Long memberId, String realName, String idCard);

    boolean checkRealName(UmsMember member);

    CommonResult<String> getOpenId(UmsMember member, String code);
}
